<include file="Public:header" />
<include file="Public:leftside" />

<div class="main-content">
	<div class="breadcrumbs breadcrumbs-fixed" id="breadcrumbs">
		<ul class="breadcrumb">
			<li> <i class="icon-home home-icon"></i> <a href="/">首页</a> </li>
			<li><a href="javascript:;">广告管理</a></li>
	
		</ul>
	</div>
	<div class="page-content">
 
  <div class="wrap js-check-wrap">
    <form class="form form-horizontal" role="form" action="{:U('shop/add_ad')}" method="post">
      <div class="tabbable">
            <div class="tab-content">
           
            <fieldset>
              <div class="form-group">
                <label class="col-sm-2 control-label">广告类型</label>
                <div class="controls">
                  <select name="ad_type" id="ad_type">
                    <option value="1">幻灯类</option>
                    <option value="2">商品类</option>
                    <option value="3">品牌类</option>
                    <option value="4">店铺类</option>
                  </select>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label">广告名称</label>
                <div class="controls">
                  <input type="text" name="ad_name" value="" required><span class="form-required">*</span>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label">广告副类名</label>
                <div class="controls">
                  <input type="text" name="sub_name" value=""  required>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label">首页显示</label>
                <div class="controls">
                  <select name="ad_home" id="ad_home">
                    <option value="0">否</option>
                    <option value="1">是</option>
                  </select>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label">状态</label>
                <div class="controls">
                  <select name="ad_status">
                    <option value="1">投放</option>
                    <option value="0">禁用</option>
                  </select>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label">排序</label>
                <div class="controls">
                  <input type="text" name="listorder" value="0" required><span class="form-required">*</span>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label">广告容器标识</label>
                <div class="controls">
                  <input type="text" name="ad_container" value="" placeholder="容器ID" required><span class="form-required"> * 标识须与前端广告容器标识一致,标识为英文</span>
                </div>
              </div>
            </fieldset>
         
             <div class="form-actions" style="padding-left: 250px;">
               <button class="btn btn-info formSubmit" id="form" type="button"><i class="icon-ok bigger-110"></i>提交</button>
                <a class="btn btn-default" href="javascript:backMainPage()">返回</a>
            </div>
            </div>
        </div>
       
    </form>
  </div>


    </div>
</div>


<script>
//全局变量
    var GV = {
         DIMAUB: "/",
        JS_ROOT: "NewAdmin/js/",
        TOKEN: ""
    };
</script>
<script src="/NewAdmin/js/wind.js"></script>
<link href="/NewAdmin/js/artDialog/skins/default.css" rel="stylesheet" />
<script src="/NewAdmin/js/zhlmy.js"></script>
<script type="text/javascript">
var ad_type='{$ad_type}';

function backMainPage(){
   switch(parseInt(ad_type)){
    case 1 :
    window.location="{:U('shop/sliderAD')}";
    break;
    case 2 :
    window.location="{:U('shop/termsAD')}";
    break;
    case 3 :
    window.location="{:U('shop/normalAD')}";
    break;
    defaut:

    break;
   }
}

$(function(){
  $('#ad_type').val(ad_type);

})
</script>
<include file="Public:footer" />
